﻿using System;

namespace HW0310_3
{
    class Program
    {
        static void Main()
        {
            Console.WriteLine("******sieve of Eratosthenes******");
            Boolean[] b = new bool[101];
            for (int i = 0; i <= 100; i++) // the 0 index is void
                b[i] = true;
            for (int i = 2; i <= Math.Sqrt(100); i++)
                if (b[i] == true)
                    for (int j = 2; i * j <= 100; j++)
                        b[i * j] = false;
            for (int i = 2; i <= 100; i++)
                if (b[i] == true)
                    Console.Write(i + " ");
            Console.WriteLine();
            Console.WriteLine("******sieve of Eratosthenes******");
        }
    }
}